﻿<Window x:Class="PartsTracker.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Part Tracker" Height="785" Width="1044">

    <Window.Resources>
        <Style  TargetType="{x:Type ListBoxItem}">
            <Style.Triggers>
                <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                    <Setter Property="Background" Value="LightGray"></Setter>
                </Trigger>
                <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                    <Setter Property="Background" Value="DarkGray"></Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>

    <Grid Background="#15151515">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Column="0" Background="#15151515" >
            <ComboBox x:Name="ToolComboBox" Margin="10,10,10,688" SelectionChanged="ToolComboBox_SelectionChanged"/>
            <Grid Margin="0,63,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBox Grid.Column="0" x:Name="SearchTextBox" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Top"  Height="47" TextChanged="TextBox_TextChanged_1" Margin="20,10,0,0" Background="#EEE" Text="Start typing to search" GotFocus="SearchTextBox_GotFocus"/>
                <Button Grid.Column="1" Content="Add Part" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="70" Height="47" Click="Button_Click_3" Margin="0,10,0,0"/>
            </Grid>
            <ListBox x:Name="PartListBox" AlternationCount="2" HorizontalAlignment="Stretch" Margin="10,130,0,10" VerticalAlignment="Stretch" SelectionChanged="PartListBox_SelectionChanged" FontSize="14" Background="#15151515" />
        </Grid>

        <GridSplitter Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" ShowsPreview="False" Background="#15151515"  Width="5" />

        <Grid Grid.Column="2" Background="#15151515" >
            <Grid.RowDefinitions>
                <RowDefinition Height="39*"/>
                <RowDefinition Height="707*"/>
            </Grid.RowDefinitions>


            <TextBox x:Name="ToolTextBox" HorizontalAlignment="Stretch" Margin="100,10,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" IsEnabled="False"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,16,0,0" TextWrapping="Wrap" Text="Tool" VerticalAlignment="Top" Height="35" Width="91" Grid.RowSpan="2"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,30,0,0" TextWrapping="Wrap" Text="S / N" VerticalAlignment="Top" Height="35" Width="91" Grid.Row="1"/>
            <TextBox x:Name="SerialNumberTextBox" HorizontalAlignment="Stretch" Margin="100,24,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" IsEnabled="False" Grid.Row="1"/>

            <Button Content="Save Part&#xa;" HorizontalAlignment="Left" Margin="100,90,0,0" VerticalAlignment="Top" Width="99" Height="26" Click="Button_Click_2" Grid.Row="1"/>


            <TextBox x:Name="HoursTextBox" HorizontalAlignment="Stretch" Margin="100,56,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" IsEnabled="False" Grid.Row="1"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,56,0,0" TextWrapping="Wrap" Text="RF Hours" VerticalAlignment="Top" Height="35" Width="91" Grid.Row="1"/>
            <Separator HorizontalAlignment="Stretch" Height="29" Margin="10,121,10,0" VerticalAlignment="Top" Grid.Row="1"/>
            <TextBox x:Name="HoursEnteredTextBox" HorizontalAlignment="Stretch" Margin="100,149,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" IsEnabled="False" Grid.Row="1"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,149,0,0" TextWrapping="Wrap" Text="Hours Entered" VerticalAlignment="Top" Height="20" Width="91" Grid.Row="1"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,183,0,0" TextWrapping="Wrap" Text="Date" VerticalAlignment="Top" Height="35" Width="91" Grid.Row="1"/>
            <DatePicker x:Name="DateTimePicker" HorizontalAlignment="Stretch" Margin="100,183,10,0" VerticalAlignment="Top" IsEnabled="False" Grid.Row="1" Height="29"/>
            <TextBox x:Name="CommentTextBox" HorizontalAlignment="Stretch" Margin="100,217,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" IsEnabled="False" Grid.Row="1"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,218,0,0" TextWrapping="Wrap" Text="Comment" VerticalAlignment="Top" Height="35" Width="91" Grid.Row="1"/>
            <Button x:Name="SaveRecordButton" Content="Save Record" HorizontalAlignment="Left" Margin="100,251,0,0" VerticalAlignment="Top" Width="99" Click="Button_Click_1" IsEnabled="False" Height="26" Grid.Row="1"/>
            <Button x:Name="AddHistoryButton" Content="Add Part History" HorizontalAlignment="Left" Margin="10,325,0,0" VerticalAlignment="Top" Width="151" Click="Button_Click_4" Height="26" Grid.Row="1"/>
            <ListBox x:Name="PartHistory" AlternationCount="2" HorizontalAlignment="Stretch" Margin="0,356,0,10" VerticalAlignment="Stretch" SelectionChanged="PartHistory_SelectionChanged" Background="#15151515" Grid.Row="1"/>
        </Grid>


    </Grid>

</Window>
